package com.dream.cms.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.kafka.core.KafkaTemplate;
import org.springframework.kafka.support.SendResult;
import org.springframework.stereotype.Component;

import java.util.concurrent.ExecutionException;

@Component
public class Sender {

//    @Autowired
//    private KafkaTemplate<String, String> kafkaTemplate;

    @Value("${custom.topic-name}")
    private String topicName;

    public void sendMessage(String message) throws ExecutionException, InterruptedException {
//        SendResult<String,String> result = kafkaTemplate.send(topicName,message).get();
        System.out.println("111");
    }

}
